#include "Thread.h"
#include <process.h>


HANDLE Thread::start()
{

	unsigned threadId = 0;

	m_hThread = (HANDLE)_beginthreadex(NULL, 1024*1024, threadFunc, 
										this, 0, &threadId);

	return m_hThread;

}

void Thread::waitForTermination()
{
	WaitForSingleObject(m_hThread, INFINITE);
	CloseHandle(m_hThread);
	m_hThread = 0;
}